package com.yx.enterresourceplanning.service.serviceImpl;

import com.yx.enterresourceplanning.entity.Department;
import com.yx.enterresourceplanning.mapper.DeptDao;
import com.yx.enterresourceplanning.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptDao deptDao;
    //获取部门列表
    @Override
    public List<Department> getListDept() {
        return deptDao.getListDept();
    }
    //根据部门类型获取部门列表
    @Override
    public List<Department> getListDeptByType(String type) {
        return deptDao.getListDeptByType(type);
    }

    @Override
    public int addDept(String depId,String department,String type) {
        return deptDao.addDept(depId,department,type);
    }

}
